home *** CD-ROM | disk | FTP | other *** search
/ Wonky Flux Batch 2019 02 / Wonky_Flux_Batch_2019-02.zip / Wonky Flux Batch 2019-02 / 093 - Land of Spur.dsk / SPUR.LOGON.S < prev    next >
Text File  |  2019-02-17  |  15KB  |  468 lines

  1.                          ; _  _  _  _  _  _  _  _  _
  2.                          ;[_][_][_][_][_][_][_][_][_]
  3.                          ;
  4.                          ;       The Land of SPUR 
  5.                          ;
  6.                          ;       (C)opyright 1987
  7.                          ;         Greg W. Davis
  8.                          ;             and
  9.                          ;       Peripherals Plus
  10.                          ;
  11.                          ; 03/16/87             19:19
  12.                          ;___________________________
  13.                          ;           v3.0
  14.                          ;    Spur Logon Segment
  15.                          ; _  _  _  _  _  _  _  _  _
  16.                          ;[_][_][_][_][_][_][_][_][_]
  17.  
  18.           public quit1
  19.           public quit3
  20.           public login2
  21.           public new2
  22.           public start2
  23.           public main
  24.  
  25.           on nocar goto quit4
  26.           print chr$(12)
  27.           print \\"      Welcome to the LAND OF SPUR"
  28.           print \\"      Presented for Your Enjoyment"
  29.           print \\"      By The West Coast Edition BBS"
  30.  
  31. start
  32.           store "a:var":dc$="":pn=0:sn=0:ew=clock(1):wa=0:ma=0:pa=0:sl=0:tm=0
  33.           dy$=dx$+"spur.data"
  34.           open #1,dy$:a=mark(1):close
  35.           if (a) and (info(5)) then dy$=ds$+"spur.control":link dy$,"configure"
  36.           if a print \"Game Closed!":recall "a:var":link "a:main.seg","fromsys"
  37. start2
  38.           open #1,dy$
  39.           input #1,g$,np,go,oh,ol,og,lg$
  40.           input #1,lc,mc,ic,sc,wc,ac,cg
  41.           input #1,pq,sd,mv,td,bd
  42.           input #1,dh,dl:close
  43.           dy$=dx$+"spur.users":x=1
  44.           open #1,dy$
  45. start3
  46.           position #1,130,x
  47.           input #1,n1$,n,pn:if n=un close:goto login
  48.           x=x+1:if x>np close:goto new
  49.           goto start3
  50.  
  51. new
  52.           f$=dx$+"new.player.info":gosub show.file
  53.           input @0\\"Do you wish to enter the Land? "i$
  54.           if i$<>"Y" print:goto quit2
  55. new2
  56.           on nocar goto quit4
  57.           print \"Enter your Players name (15 Char. Max.)"
  58.           input @1 "-> " n1$:if len(n1$)>15 print \"Name too long..":goto new2
  59. new3
  60.           print \'Please Choose a Class:
  61.  
  62. 1)        Alchemist   4) Paladin  7) Archer
  63. 2)        Druid       5) Ranger   8) Assassin
  64. 3)        Fighter     6) Thief    9) Knight
  65.  
  66.           Your Choice (1-9): ';
  67.           input i$:pc=val(i$)
  68.           if (pc>9) or (pc<1) goto new3
  69. new4
  70.           print \'Please Choose a Race:
  71.  
  72. 1)        Human    4) Elf        7) Dwarf
  73. 2)        Ogre     5) Hobbit     8) Orc
  74. 3)        Gnome    6) Halfling   9) Half-Elf
  75.  
  76.           Your Choice (1-9): ';
  77.           input i$:pr=val(i$)
  78.           if (pr<1) or (pr>9) goto new4
  79.           input @0\"Is this Correct? "i$
  80.           if i$<>"Y" input @0\"[R]edo entry or [A]bort? "i$
  81.           if i$="R" goto new2
  82.           if i$="A" goto quit2
  83.  
  84. status
  85.           print \\"Rolling..";
  86.           gosub getnum:pd=b
  87.           gosub getnum:ps=b
  88.           gosub getnum:pt=b
  89.           gosub getnum:pi=b
  90.           gosub getnum:pw=b
  91.           gosub getnum:pe=b
  92.           goto stat1
  93.           
  94. getnum
  95.           zz$=rnd$:a=0
  96. getnum1
  97.           print "."      ;
  98.           b=asc(rnd$)-64:if b>17 then b=b-7
  99.           if b=>11 return
  100.           a=a+1:if a<10 then zz$=rnd$:goto getnum1
  101.           b=b+9:if b<11 goto getnum1
  102.           return
  103.           
  104. stat1
  105.           if pc=1 then pw=pw+2:pt=pt-1:pi=pi+2
  106.           if pc=2 then pw=pw+2:ps=ps-1:pi=pi+2
  107.           if pc=3 then pw=pw-1:pt=pt+2:ps=ps+2:pi=pi-1:pd=pd-1:pe=pe+2
  108.           if pc=4 then ps=ps+1:pi=pi+1:pd=pd+1
  109.           if pc=5 then ps=ps+1:pi=pi-1:pw=pw+1
  110.           if pc=6 then pw=pw-1:pd=pd+1:pe=pe+2
  111.           if pc=7 then pd=pd+2:pe=pe-1
  112.           if pc=8 then ps=ps+2:pd=pd-1
  113.           if pc=9 then pt=pt+1:pi=pi+1:pe=pe-1
  114.           if pr=1 then pd=pd+1:ps=ps-1:pi=pi+2:pw=pw+1:pe=pe-1
  115.           if pr=2 then pd=pd-1:ps=ps+3:pt=pt+2:pi=pi-2:pw=pw-1
  116.           if pr=3 then pd=pd-1:ps=ps+1:pw=pw+1
  117.           if pr=4 then pd=pd+2:pt=pt-1:pi=pi+1:pw=pw+2
  118.           if pr=5 then pd=pd+1:ps=ps-1:pi=pi+2:pe=pe+1
  119.           if pr=6 then pd=pd+2:ps=ps-1:pt=pt+1:pi=pi+2
  120.           if pr=7 then pd=pd-1:ps=ps+2:pt=pt+1
  121.           if pr=8 then pd=pd+1:ps=ps+2:pi=pi-1:pw=pw-1:pe=pe+2
  122.           if pr=9 then pd=pd+1:pw=pw+1
  123.           
  124.           zz$=rnd$:hp=((ps+pd+pt+pi+pw+pe)/6)+random(10):ep=0
  125.           zz$=rnd$:x=random(10):if x>5 then sh=0:ar=0:goto stat2
  126.           zz$=rnd$:sh=random(30):zz$=rnd$:ar=random(30)
  127. stat2
  128.           print \\"Hit Points   :"hp
  129.           print "Strength     :"ps
  130.           print "Dexterity    :"pd
  131.           print "Constitution :"pt
  132.           print "Intelligence :"pi
  133.           print "Wisdom       :"pw
  134.           print "Energy Level :"pe
  135.           print "Shield       :";:if sh print sh"%":else print "None"
  136.           print "Armor        :";:if ar print ar"%":else print "None"
  137.           print \'
  138. Hold      while you are entered into the
  139. BOOK      of SPUR.....'
  140.           gosub nw.plyr
  141.           
  142.           print \'
  143. SPUR,     the almighty and omnipotent,
  144. senses    your intrusion into HIS land!!
  145. "Thou     doust dare to enter MY land?
  146. I         await thee at the appointed site!"'
  147.           gosub rd.user
  148.           
  149.           goto login1
  150.  
  151. main
  152.           cl=1:cr=0
  153.           gosub dwf.spur
  154.           goto login.5
  155.  
  156.  
  157.                          ; *** Login Routine ***
  158.  
  159. login
  160.           print \'A Wizard greets you and begs you wait.
  161. Your      status must be verified to pass...'
  162.           gosub tim.read
  163.           gosub rd.user
  164.           if (n1$=lg$) and (not info(5)) and (un<>dm) print \'
  165. You       were the last Adventurer. You must
  166. wait      till another passes through!'\:goto quit2
  167. login1
  168.           gosub set.pa:xo=xf:xo$=xf$
  169.           if (not td) then text:home:print
  170.           if (not bd) goto login1.5
  171.           poke 35,20
  172.           a$=a1$+" "+a2$
  173.           l=len(a$)+12:a=peek(33)-l:a=a/2:l=peek(33)-l:l=l-a
  174.           print #3 @1,22 chr$(45,a)"[ #"right$("   "+str$(un),4)"-"a$" ]-"chr$(45,l):print #3 @1,1
  175.           gosub tim.chk:gosub screen
  176. login1.5
  177.           xt$="":xt=0
  178.           print \"WELCOME "n1$"! Venture forth!"
  179.           print \"The last Adventurer was "lg$
  180.           print "There have been "np" players in SPUR."
  181.           if (not info(5)) and (un<>dm) goto login2
  182.           input @0\"Link Sysop Utilities? "a$:if a$="Y" then dy$=ds$+"spur.sysop":link dy$
  183.           
  184. login2
  185.           tm=0
  186.           if cr then dy$=dz$+"spur.main":link dy$,"travel3"
  187.           dy$=dz$+"spur.shop":link dy$
  188.           
  189.                          ; ***************
  190.                          ; *  Show File  *
  191.                          ; ***************
  192.  
  193. show.file
  194.           setint(1):print \s$\:copy f$:setint(""):return
  195.  
  196.                          ; ***********************
  197.                          ; *  Read Player Stats  *
  198.                          ; ***********************
  199.           
  200. rd.user
  201.           dy$=dx$+"spur.users"
  202.           open #1,dy$:position #1,130,pn
  203.           input #1,n1$,sn,pn,cl,cr,hp
  204.           input #1,ps,pt,pi,pe,pw,pd
  205.           input #1,gh,gl,bh,bl,sh,ar,pc,pr,ep,mk,mm,xp
  206.           input #1,df,sl,sr:close
  207.           dy$=dx$+"spur.allies"
  208.           open #1,dy$:position #1,78,pn
  209.           input #1,d1$,a1,h1\d2$,a2,h2\d3$,a3,h3
  210.           close
  211.           
  212.           dy$=dx$+"spur.weapons"
  213.           open #1,dy$:position #1,64,pn
  214.           input #1,xw\xw$:close
  215.           dy$=dx$+"spur.stores"
  216.           open #1,dy$:position #1,44,pn
  217.           input #1,xf\xf$:close
  218.           dy$=dx$+"spur.items"
  219.           open #1,dy$:position #1,84,pn
  220.           input #1,xi\xi$:close
  221.           dy$=dx$+"spur.monsters"
  222.           open #1,dy$:position #1,44,pn
  223.           input #1,xm\xm$:close
  224.           dy$=dx$+"spur.spells"
  225.           open #1,dy$:position #1,44,pn
  226.           input #1,xs\xs$:close
  227.           return
  228.           
  229.  
  230.                          ; ************************
  231.                          ; *  Write Player Stats  *
  232.                          ; ************************
  233.           
  234. wr.user
  235.           dy$=dx$+"spur.users"
  236.           open #1,dy$:position #1,130,pn
  237.           print #1,n1$,sn,pn,cl,cr,hp
  238.           if (not sn) close:return
  239.           print #1,ps,pt,pi,pe,pw,pd
  240.           print #1,gh,gl,bh,bl,sh,ar,pc,pr,ep,mk,mm,xp
  241.           print #1,df,sl,sr:close
  242.           dy$=dx$+"spur.allies"
  243.           open #1,dy$:position #1,78,pn
  244.           print #1,d1$,a1,h1\d2$,a2,h2\d3$,a3,h3
  245.           close
  246.           
  247.           dy$=dx$+"spur.weapons"
  248.           open #1,dy$:position #1,64,pn
  249.           print #1,xw\xw$:close
  250.           dy$=dx$+"spur.stores"
  251.           open #1,dy$:position #1,44,pn
  252.           print #1,xf\xf$:close
  253.           dy$=dx$+"spur.items"
  254.           open #1,dy$:position #1,84,pn
  255.           print #1,xi\xi$:close
  256.           if xm<=10 goto wr.user3
  257.           x=xm-10
  258.           for a=1 to x
  259.           zz$=rnd$:b=random(xm):if b=0 then b=1
  260.           y=(b*4)-3:l=len(xm$)
  261.           if y=1 then xm$=mid$(xm$,5):goto wr.user2
  262.           if (y+4)>l then xm$=left$(xm$,y-1):goto wr.user2
  263.           xm$=left$(xm$,y-1)+mid$(xm$,y+4)
  264. wr.user2
  265.           xm=xm-1
  266.           next:xm=10
  267. wr.user3
  268.           dy$=dx$+"spur.monsters"
  269.           open #1,dy$:position #1,44,pn
  270.           print #1,xm\xm$:close
  271.           dy$=dx$+"spur.spells"
  272.           open #1,dy$:position #1,44,pn
  273.           print #1,xs\xs$:close
  274.           return
  275.           
  276.  
  277.                          ; ****************
  278.                          ; *  New Player  *
  279.                          ; ****************
  280.           
  281. nw.plyr
  282.           gosub dwf.spur
  283.           f$=dx$+"spur.users"
  284.           open #1,f$
  285.           if sn goto nw.plyr2
  286.           sn=un:x=1
  287. nw.plyr1
  288.           position #1,130,x:input #1,a$,n
  289.           if (not n) then pn=x:goto nw.plyr2
  290.           x=x+1:goto nw.plyr1
  291. nw.plyr2
  292.           position #1,130,pn
  293.           print #1,n1$,sn,pn,1,0,hp
  294.           print #1,ps,pt,pi,pe,pw,pd
  295.           print #1,0,1000,0,0,sh,ar,pc,pr,0,0,0,1
  296.           print #1,df,sl,sr
  297.           close
  298.           f$=dx$+"spur.allies"
  299.           open #1,f$
  300.           position #1,78,pn
  301.           for x=1 to 3:print #1,"*,0,0":next
  302.           close:if pn>np then np=pn
  303.           
  304.           a=0:a$=""
  305.           f$=dx$+"spur.items"
  306.           open #1,f$:position #1,84,pn
  307.           print #1,a\a$:close
  308.           f$=dx$+"spur.weapons"
  309.           open #1,f$:position #1,64,pn
  310.           print #1,a\a$:close
  311.           f$=dx$+"spur.stores"
  312.           open #1,f$:position #1,44,pn
  313.           print #1,a\a$:close
  314.           dy$=dx$+"spur.monsters"
  315.           open #1,dy$:position #1,44,pn
  316.           print #1,a\a$:close
  317.           dy$=dx$+"spur.spells"
  318.           open #1,dy$:position #1,44,pn
  319.           print #1,a\a$:close
  320.           f$=dx$+"spur.time"
  321.           open #1,f$:position #1,12,pn
  322.           print #1,a\a$:close
  323.           gosub tim.read
  324.           return
  325.  
  326.                          ; ***************************
  327.                          ; *  Set Player Attributes  *
  328.                          ; ***************************
  329.           
  330. set.pa
  331.           pa=ps+pd+pt+pi+pw+pe:pa=pa mod 10
  332.           return
  333.           
  334. dwf.spur
  335.           if lc=0 print\"Maze undefined..."\"Create Levels/Rooms and re-initialize.":return
  336.           zz=flag:z1=edit(5)+3072:flag=z1:fill z1,255,0
  337.           f1$=dx$+"d.level1":gosub rd.lvl
  338.           zz$=rnd$:df=random(nr)
  339.           if df=0 then df=pn
  340. dwf
  341.           if df>nr then df=df mod nr
  342.           if flag(df) goto spur
  343.           df=df+1:goto dwf
  344. spur
  345.           fill z1,255,0
  346.           s1=s1+1:if s1>1c then s1=1c
  347.           f1$=dx$+"d.level"+str$(s1)
  348.           gosub rd.lvl:
  349.           zz$=rnd$:sr=random(nr)
  350.           if sr=0 then sr=pn
  351. spur.2
  352.           if sr>nr then sr=sr mod nr
  353.           if flag(sr) then flag=zz:return
  354.           sr=sr+1:goto spur.2
  355.           
  356. rd.lvl
  357.           open #1,f1$
  358.           input #1,ln$,nr,ri
  359.           read #1,z1,255:close:return
  360.           
  361.                          ; **********************
  362.                          ; *  Time Subroutines  *
  363.                          ; **********************
  364.           
  365. tim.chk
  366.           ex=clock(1)-ew:if ex=>ev pop:goto quit1
  367.           return
  368.           
  369. tim.read
  370.           dy$=dx$+"spur.time":open #1,dy$
  371.           mt=mv:if mv=0 then mt=0:goto set.time
  372.           position #1,12,un
  373.           input #1,a$,eu
  374.           b$=left$(date$,5)+"":if a$<>b$ then eu=0
  375. set.time
  376.           close
  377.           if (not flag(34)) goto set.1
  378.           eu=0:if mt=0 then ev=3600:return
  379.           ev=mt:return
  380. set.1
  381.           if mt=0 then mt=clock(2)-clock(1):eu=0
  382.           ev=mt-eu
  383.           if ev>(clock(2)-clock(1)) then ev=clock(2)-clock(1)
  384.           if ev>0 return
  385.           gosub tim.mess:recall "a:var":link "a:main.seg","fromsys"
  386.           
  387. tim.mess
  388.           print\'
  389. Alas...the sun has set on yet another
  390. adventurer within the Land of Spur.
  391. Wake      ye early in the morning after a
  392. long      rest to resume your quest!!!'
  393.           return
  394.           
  395.                          ; ************************
  396.                          ; *  Screen Subroutines  *
  397.                          ; ************************
  398.           
  399. screen
  400.           print #3 @1,23 "LV:      RM:    |PS:     PC:     PW:   "
  401.           print #3 @1,24 "MV:      EP:    |PE:     PD:     PI:   ";
  402.           if peek(33)=40 goto scn.rtn
  403.           print #3 @41,23 "|RT:   IT:   WP:   AR:    SH:    KL:"
  404.           print #3 @41,24 "|XL:   TI:   GH:          DR:    SR:";
  405. scn.rtn
  406.           print #3 @1,20
  407.           return
  408.  
  409. scn.rst
  410.           if bd poke 35,24
  411.           home:if (not td) print ^
  412.           return
  413.           
  414.                          ; ***********************
  415.                          ; *  Save Player stats  *
  416.                          ; ***********************
  417.           
  418. quit
  419.           if cr=0 goto quit.a
  420.           if pw<7 then pw=pw+2
  421.           if pi<7 then pi=pi+2
  422.           if ps<10 then ps=ps+2
  423.           if pe<10 then pe=pe+2
  424.           if hp<20 then hp=hp+2
  425. quit.a
  426.           if (mv>0) and (ex=>ev) gosub tim.mess
  427.           print \'SPUR says hold whilst your adventure
  428. is        written in the BOOK of SPUR....'
  429.           dy$=dx$+"spur.data"
  430.           open #1,dy$
  431.           print #1,g$,np,go,oh,ol,og,n1$
  432.           print #1,lc,mc,ic,sc,wc,ac,cg
  433.           print #1,pq,sd,mv,td,bd
  434.           print #1,dh,dl:close
  435.           if (not mv) goto quit.b
  436.           eu=eu+ex:a$=left$(date$,5)+"":if left$(cm$,5)<>a$ then eu=0
  437.           dy$=dx$+"spur.time":open #1,dy$
  438.           position #1,12,un
  439.           print #1,a$,eu
  440.           close
  441.           
  442. quit.b
  443.           gosub wr.user
  444.           dy$=dx$+"spur.log"
  445.           create dy$:open #1,dy$:append #1
  446.           if wn print #1,"Player "n1$" met game objective.":close:return
  447.           print #1,"#"right$("  "+str$(un),3)"   Lvl: "right$(" "+str$(xp),2)"   HP: "right$("  "+str$(hp),2)"   "n1$
  448.           close:print \"It is written!":wn=0
  449.           return
  450.  
  451.                          ; *****************
  452.                          ; *  Link to BBS  *
  453.                          ; *****************
  454.           
  455. quit1
  456.           gosub quit
  457.           on nocar goto quit4
  458. quit2
  459.           gosub scn.rst:set zz$="":recall "a:var"
  460.           link "a:main.seg","fromsys"
  461.  
  462. quit3
  463.           gosub quit
  464. quit4
  465.           gosub scn.rst:set zz$="":recall "a:var"
  466.           link "a:main.seg","term1"
  467.  
  468.